#version 330 core

out vec4 FragColor;

uniform vec2 iResolution;
uniform float iTime;

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = fragCoord/iResolution.xy;

    // Time varying pixel color
    //vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
    vec3 c3 = vec3(uv.x, uv.y, uv.x);
    vec3 col = 0.5 + 0.5*cos(iTime + c3+vec3(0,2,4));

    // Output to screen
    fragColor = vec4(col, 1.0);
}

void main()
{
    vec4 fragColor;
    mainImage(fragColor, gl_FragCoord.xy);

    FragColor = fragColor;
}
